<template>
    <!-- <div>nepsView公众监督员</div> -->
    <div class="neps-view" :style="{ backgroundImage: `url(${bg2})` }">
        <el-container class="neps-container">
            <el-header class="neps-header">
                <headerView></headerView>
            </el-header>
            <el-main class="neps-main">
                <img :src="bg4" alt="">
                <div class="main" v-if="showWin">
                    <div class="func box1" @click="showWinFunc('/neps/toSub')">
                        提交空气质量异常信息
                    </div>
                    <div class="func box2 " @click="showWinFunc('/neps/mySub')">
                        查看我的提交
                    </div>
                </div>
                <div class="main" v-else>
                    <router-view></router-view>
                </div>
            </el-main>
        </el-container>
    </div>
</template>


<script setup lang="ts">
import { ref, provide } from 'vue';
import headerView from '../../components/common/header.vue';
import { useRouter } from 'vue-router';
const router = useRouter()
import bg4 from '../../assets/images/4.jpg'
let showWin = ref(true)
provide('showWin', showWin)
const showWinFunc = (path: string) => {
    showWin.value = false
    router.push(path)
}

</script>

<style lang="scss" scoped>
.neps-view {
    // background-color: pink;
    height: 100vh;
    width: 100vw;

    .neps-container {
        height: 100%;
        width: 100%;

        .neps-header {
            padding: 0;
            background-color: pink;
        }

        .neps-main {
            background-color: #f2f3f5;
            padding: 0;
            position: relative;

            img {
                position: absolute;
                // top: 20px;
                width: 100%;
                height: 100%;
            }

            .main {
                opacity: .7;
                z-index: 1;
                display: flex;
                align-items: center;
                justify-content: space-around;
                margin: 0 auto;
                width: 80%;
                height: 100%;
                background-color: #fff;

                .func {
                    width: 300px;
                    height: 300px;
                    border-radius: 50%;
                    transition: 0.3s 0s linear all;
                    will-change: all;
                    text-align: center;
                    white-space: wrap;
                    line-height: 300px;
                    font-size: 24px;

                    &:hover {
                        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
                        transform: scale(1.1);
                        color: #fff;
                        font-size: 26px;
                    }
                }

                .box1 {
                    background: linear-gradient(134deg, #54d685, #29c563 99%);
                    border: 6px solid #42ce50;
                }

                .box2 {
                    background: linear-gradient(180deg, #49ccf5, #4988f5);
                    border: 6px solid #49c2f5;
                }
            }
        }
    }
}
</style>